package com.ikun.common.validate.constant;

/**
 * @ClassName PatternType
 * @Description: 正则枚举 随用随添
 * @CreateDate: 2024/4/20 23:40
 */
public enum RegularPatternType {

    CHINE_PHONE("^1[3-9]\\d{9}$"),

    COMMON_EMAIL("^[\\w._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$"),

    CHINE_ID_CARD("^(1[1-5]|2[1-3]|3[1-7]|4[1-6]|5[0-4]|6[1-5])\\d{4}(19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\\d|3[0-1])\\d{3}([0-9Xx])$"),

    PASSWORD("^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{6,16}$");
    private String pattern;

    RegularPatternType(String pattern) {
        this.pattern = pattern;
    }

    public String getPattern() {
        return pattern;
    }

}
